#version 330

in vec3 oPos;
in vec3 oCol;
in vec3 oNormal;
in vec2 oTexCoord;

out vec4 oFragColor;

void main() {
     float xCell = floor(oPos.x / gridSize);
    float zCell = floor(oPos.z / gridSize);

    float m = mod(xCell + zCell, 2.);

    vec3 col = mix(colorA, colorB, m);

    oFragColor = vec4(ambient * col, 1.0);
}
